/* *****************************************************************************
 *  Garage Band: Cheeseburger in Paradise
 *
 *  CheeseBurgerParadise.h
 *
 *  Based on MotionViewer
 *
 * *****************************************************************************
 */

#ifndef _CHEESEBURGER_PARADISE_H_
#define _CHEESEBURGER_PARADISE_H_

#if OGRE_PLATFORM == OGRE_PLATFORM_APPLE
//#include <Carbon/Carbon.h>
#endif

#include "MotionViewer.h"
#include "ConfigFile.h"
#include "CBPAnimation.h"

using namespace Ogre;

class CheeseBurgerParadise: public MotionViewerApp
{
public:
	CheeseBurgerParadise();
	virtual ~CheeseBurgerParadise();

protected:

	// over riding MotionViewApp's mouse move event so that terrain is rotated as well
	virtual bool mouseMoved( const OIS::MouseEvent &arg );

	virtual bool frameStarted(const FrameEvent& evt);

	virtual void createScene(void);
	
	//part of setup as required from motionviewer
	void mvScene(void);

	// loads surf board (bar counter), sky box, and any other background model
	void loadTheme(void);
	
	// loads characters that will perform along with their instruments
	void loadPerformers(void);
	void updatePerformers(void);
	
	//skybox
	void loadSky();

	//ocean
	void loadOcean();

	// loads all membes in the band as specified by Band configuration file (band.cfg)
	void loadBand();
	
	//mocap stuff
	void loadCharacter(const char *meshFile);
	void loadMocapDataset( const char * subjectName, const char * vFile, const char *vskFile, float deltaTime);
	void connectCharacterWithData(const CharacterConfig & character, int charCount);

	//shadows function
	void setShadows();
	
	// member variables
	SceneNode * mTerrainRoot;		// terrain scene node

	CBPAnimation *cbpa;
	
	vector<float> deltaTimes;		// holds detlaT's for all characters
};

#endif

